package com.tencent.web.controller;

import com.tencent.entity.Result;
import com.tencent.service.impl.ShowpeoService2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;
@RestController
@RequestMapping("/report")
public class ShowController {
    /**
     * 获取运营统计数据
     *
     * @return
     */
    @Autowired
    private ShowpeoService2 showpeoService2;

    @RequestMapping("/getBusinessReportData")
    public Result getBusinessReportData() throws Exception{
        try {
            Map<String, Object> result = showpeoService2.getBusinessReport();
            //System.out.println(result.get("member"));
            return Result.success(result);

        } catch (Exception e) {
            e.printStackTrace();
            return Result.error("错误");
        }

    }
}